<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<form method="post" action="/Orcamento/spent/save">
	<fieldset>
		<legend>Perda</legend>
		<label>
			Evento
			<select name="spent.event.id" required>
				<option value="">Selecione um evento</option>
				<c:forEach items="${events}" var="event">
					<option value="${event.id}">${event.name}</option>
				</c:forEach>
			</select>
		</label>
		<label>
			Valor
			<input type="text" name="spent.value" required placeholder="Valor do Gasto" class="money" />
		</label>
		<label>
			Data
			<input type="date" name="spent.spentDay" required class="input-medium" />
		</label>
		<label>
			Fundo
			<select name="spent.fund.id" required>
				<option value="">Selecione um Fundo</option>
				<c:forEach items="${funds}" var="fund">
					<option value="${fund.id}">${fund.event.name}</option>
				</c:forEach>
			</select>
		</label>		
		
		<button type="submit" class="btn" id="submit">Cadastrar</button>
	</fieldset>
	
</form>